<?php  

	/**
	* 简历第三阶段
	*/
	class Resume3Model extends Model
	{
		public $table = 'people_resume3';

		public $validate = array(
			array('skill', 'nonull', '技能特长必填', 2, 3),
			array('skill', 'maxlen:255', '技能特长不得超于255字', 2, 3)
			);

		public $auto = array(
			array('resume1_reid', '_reid', 'method', 2, 1)
			);
		public function _reid(){
			return Q('post.reid', 0, 'intval');
		}

		public function get_data($reid){
			return $this->where(array('resume1_reid'=>$reid))->find();
		}


		public function have_data($reid)
		{
			return $this->where('resume1_reid = '.$reid)->getField('resume1_reid');
		}


		/**
		 * 添加数据
		 */
		public function add_data(){
			return $this->add();
		}

		/**
		 * [update_data 修改]
		 */
		public function update_data($reid){
			return $this->where(array('resume1_reid'=>$reid))->save();
		}
	}

?>